package com.qixiaobao.nondirect.invoice.mapper;

import com.qixiaobao.nondirect.invoice.domain.Bill;
import com.qixiaobao.nondirect.invoice.domain.BillMerge;
import com.qixiaobao.nondirect.invoice.domain.BillMergeBill;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Description 开票合并信息 数据层
 * @Author yangxm
 * @Date 2025/7/7 11:45
 */
@Mapper
public interface BillMergeMapper {


    /**
     * @Description 保存
     * @Author yangxm
     * @Date 2025/7/7 11:47
     * @param billMerge
     * @return int
     */
    int insertBillMerge(BillMerge billMerge);

    /**
     * @Description 保存开票信息与合并开票信息关联表
     * @Author yangxm
     * @Date 2025/7/7 11:47
     * @param billMergeBill
     * @return int
     */
    int insertBillMergeBill(BillMergeBill billMergeBill);

    /**
     * @Description 更新合并开票的开票月份和最大金额对应的发票日期
     * @Author yangxm
     * @Date 2025/7/7 11:47
     * @param billMerge
     * @return int
     */
    int updateMaxInvoiceDate(BillMerge billMerge);

    /**
     * @Description 根据合并开票ID查询合并开票信息
     * @Author yangxm
     * @Date 2025/7/7 11:47
     * @param id
     * @return BillMerge
     */
    BillMerge selectBillMergeById(Long id);

    int updateBillMerge(BillMerge billMerge);

    /**
     * @Description 根据合并开票ID查询合并开票明细
     * @Author yangxm
     * @Date 2025/7/7 11:47
     * @param billMergeId
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.Bill>
     */
    List<Bill> selectBillListByMergeId(Long billMergeId);
}
